home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
bbs
/
twall62s.zip
/
thewall.mh
< prev
next >
Wrap
Text File
|
1996-07-27
|
2KB
|
96 lines
void cutchar(ref string: line, int: index);
void inputstring(ref string: line, int: maxlen);
#ifndef __INPUT_MH
#include <input.mh>
#endif
struct _line
{
array[1..5] of string: text;
array[1..5] of string: colour;
array[1..5] of int: x;
array[1..5] of int: y;
};
struct _line: ln;
void dec(ref int: x)
{
x := x - 1;
}
void gotoxy(int: x, int: y)
{
print(AVATAR_GOTO, (char)x, (char)y);
}
string getline(int: f, string: colour)
{
string: line;
print(AVATAR_GOTO, (char)ln.x[f], (char)ln.y[f]);
print (" ");
print(AVATAR_GOTO, (char)ln.x[f], (char)ln.y[f]);
print(colour);
if (ln.text[f]<>"") line:=ln.text[f];
// input_str(line, INPUT_NOCLEOL | INPUT_NOCTRLC | INPUT_DEFAULT, 0, 61, "");
inputstring(line, 61);
return line;
}
void showline(int: f)
{
print (AVATAR_GOTO, (char)ln.x[f], (char)ln.y[f]);
print (" ");
print (AVATAR_GOTO, (char)ln.x[f], (char)ln.y[f]);
if (f>1) print (current_colour);
if (f=1) current_colour:=LIGHTGREEN;
print (strpad(colstring(ln.text[f]),61,' '));
ln.colour[f]:=current_colour;
}
void blankline(int: f)
{
print (AVATAR_GOTO, (char)ln.x[f], (char)ln.y[f]);
print (" ");
}
void update(int:f)
{
char: nomore;
nomore:=FALSE;
for(f; f<=5; f:=f+1)
{
// if (ln.text[f]="/q") nomore:=TRUE;
if (nomore=FALSE) showline(f);
else blankline(f);
}
}
string getsig(string: signature)
{
// string: signature;
print(AVATAR_GOTO, (char)12, (char)24);
print(" ");
print(AVATAR_GOTO, (char)12, (char)24);
// input_str(signature, INPUT_NOCLEOL | INPUT_NOCTRLC, 0, 30, signcolour);
print(signcolour);
inputstring(signature,30);
// replaced input_str with inputstring
print(AVATAR_GOTO, (char)12, (char)24);
print(" ");
print(AVATAR_GOTO, (char)12, (char)24);
print(strpad(colstring(signature),30,' '));
return signature;
}
void pause()
{
print(COL_LRED+"\nTap any key..");
getch();
print("\n");
}